function change(){
		var img2 = document.getElementById("checkImg");
		img2.src="${pageContext.request.contextPath}/checkImg.action?time="+new Date().getTime();
	}
	

	$(document).ready(function(){
		var error = $("#error").val();
		var message = $("#message").val();
		if(message != ''){
			layer.msg(message,{
					icon: 2,
					time: 4000 ,
					offset:['220px','']
			});
		}
		if(error != ''){
			layer.alert(error,{
				icon: 2,
				offset:['220px','']
			});
			$("#error").val('');
		}
		$("#error").val('');
		$("#message").val('');
		
		$(".submit").click(function() {
			if($("#username").val() == '' || $("#password").val() == '') {
				layer.alert('请输入用户名和密码',{icon: 0});
			} else if($("#checkcode").val() == ''){
				layer.alert('请输入验证码',{icon: 0});
			} else{
				$("#loginForm").submit();
			}
		});
		$(document).keyup(function(e){
			if(e.keyCode == 13){
				$(".submit").trigger("click");
			}
		})
	});
	
